package Stdlog::Globals::Verbose;

use 5.008;
use strict;
use base qw(Tie::StdScalar);

sub STORE {
    my $r = shift;
    $$r = shift;
    my $sev = $$r ? 'INFO+' : 'NOTICE+';
    for ( @Stdlog::loggers ) {
        my $conf = $_->conf;
        $conf->{severity} = $sev;
        $_->criteria($conf);
    }
}

package Stdlog::Globals::Debug;

use 5.008;
use strict;
use base qw(Tie::StdScalar);

sub STORE {
    my $r = shift;
    $$r = shift;
    my $sev = $$r ? 'DEBUG+' : 'NOTICE+';
    for ( @Stdlog::loggers ) {
        my $conf = $_->conf;
        $conf->{severity} = $sev;
        $_->criteria($conf);
    }
}


1;
__END__

=head1 NAME

Stdlog::Globals - 

=head1 SYNOPSIS

  

=head1 DESCRIPTION


=head1 CLASS METHODS

=head2 Stdlog::Writer->new(\%conf)


=head1 OBJECT METHODS


=head1 EXPORTS

None by default.


=head1 SEE ALSO


=head1 AUTHOR

Robert Mah E<lt>rmah@pobox.comE<gt>


=head1 COPYRIGHT AND LICENSE

Copyright (C) 2009 by Robert Mah

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.

=cut
